<template>
    <div class="home">
        <div class="hero-image">
            <HomeHeader />
            <div class="hero-content">
                <h1 class="title">寻找你的梦中情屋</h1>
                <p class="subtitle">欢迎访问我们的房产平台，为您提供最新、最全的房产信息。我们竭力于帮助您找到理想的家，从城市中心到宁静郊区，满足您的各种需求。</p>
            </div>
            <SearchBox />
        </div>
        <AreaBrowse />
        <HotHouses />
        <NewHouses />
        <HouseService />
        <FindBestLocation />
        <Footer />
        <LoginModal v-model:visible="showLoginModal" />
    </div>
</template>

<script setup>
import HomeHeader from './components/HomeHeader.vue'
import SearchBox from './components/SearchBox.vue'
import LoginModal from '@/views/login/index.vue'
import AreaBrowse from './components/AreaBrowse.vue'
import HouseService from './components/HouseService.vue'
import NewHouses from './components/NewHouses.vue'
import HotHouses from './components/HotHouses.vue'
import FindBestLocation from './components/FindBestLocation.vue'
import Footer from '@/views/common/Footer.vue'
import { ref, provide } from 'vue'

const showLoginModal = ref(false)

provide('showLoginDialog', () => {
    showLoginModal.value = true
})
</script>

<style lang="scss" scoped>
.home {
    width: 1920px;
    margin: 0 auto;
    
    .container {
        width: 100%;
        padding: 0 60px;
        box-sizing: border-box;
    }
}

.hero-image {
    width: 1920px;
    height: 752px;
    background-color: #2F3B59;
    position: relative;
    background-image: url('@/assets/images/hero-image.jpg');
    background-size: cover;
    background-position: center;
}

.hero-content {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    
    .title {
        font-size: 48px;
        margin-bottom: 20px;
        font-weight: 500;
    }
    
    .subtitle {
        font-size: 16px;
        line-height: 1.6;
        opacity: 0.9;
        max-width: 696px;
    }
}
</style> 